﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Dos.ORM;

namespace GongXianDCUI.Models
{

    /// <summary>
    /// 文章
    /// </summary>
    [Table("Article")]
    [Serializable]
    public partial class Article : Entity
    {
        #region Model
        private long _articleId;
        private int? _categoryId;
        private string _title;
        private string _content;
        private string _keyword;
        private string _issuer;
        private DateTime? _pubdate;
        private int? _state;
        private int? _hits;
        private string _newFlag;
        private string _hotFlag;
        private string _topFlag;
        private string _picFlag;
        private string _Privilege;
        private string _ImageUrl;

        /// <summary>
        /// 
        /// </summary>
        [Field("articleId")]
        public long articleId
        {
            get { return _articleId; }
            set
            {
                this.OnPropertyValueChange("articleId");
                this._articleId = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        [Field("categoryId")]
        public int? categoryId
        {
            get { return _categoryId; }
            set
            {
                this.OnPropertyValueChange("categoryId");
                this._categoryId = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        [Field("title")]
        public string title
        {
            get { return _title; }
            set
            {
                this.OnPropertyValueChange("title");
                this._title = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        [Field("content")]
        public string content
        {
            get { return _content; }
            set
            {
                this.OnPropertyValueChange("content");
                this._content = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        [Field("keyword")]
        public string keyword
        {
            get { return _keyword; }
            set
            {
                this.OnPropertyValueChange("keyword");
                this._keyword = value;
            }
        }
        /// <summary>
        /// 发布人
        /// </summary>
        [Field("issuer")]
        public string issuer
        {
            get { return _issuer; }
            set
            {
                this.OnPropertyValueChange("issuer");
                this._issuer = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        [Field("pubdate")]
        public DateTime? pubdate
        {
            get { return _pubdate; }
            set
            {
                this.OnPropertyValueChange("pubdate");
                this._pubdate = value;
            }
        }
        /// <summary>
        /// 1=发布，2=未发布
        /// </summary>
        [Field("state")]
        public int? state
        {
            get { return _state; }
            set
            {
                this.OnPropertyValueChange("state");
                this._state = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        [Field("hits")]
        public int? hits
        {
            get { return _hits; }
            set
            {
                this.OnPropertyValueChange("hits");
                this._hits = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        [Field("newFlag")]
        public string newFlag
        {
            get { return _newFlag; }
            set
            {
                this.OnPropertyValueChange("newFlag");
                this._newFlag = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        [Field("hotFlag")]
        public string hotFlag
        {
            get { return _hotFlag; }
            set
            {
                this.OnPropertyValueChange("hotFlag");
                this._hotFlag = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        [Field("topFlag")]
        public string topFlag
        {
            get { return _topFlag; }
            set
            {
                this.OnPropertyValueChange("topFlag");
                this._topFlag = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        [Field("picFlag")]
        public string picFlag
        {
            get { return _picFlag; }
            set
            {
                this.OnPropertyValueChange("picFlag");
                this._picFlag = value;
            }
        }
        /// <summary>
        /// 开放、保密
        /// </summary>
        [Field("Privilege")]
        public string Privilege
        {
            get { return _Privilege; }
            set
            {
                this.OnPropertyValueChange("Privilege");
                this._Privilege = value;
            }
        }
        [Field("ImageUrl")]

        public string ImageUrl { get { return _ImageUrl; } set { this.OnPropertyValueChange("ImageUrl"); this._ImageUrl = value; } }

        #endregion

        #region Method
        /// <summary>
        /// 获取实体中的主键列
        /// </summary>
        public override Field[] GetPrimaryKeyFields()
        {
            return new Field[] {
                _.articleId,
            };
        }
        /// <summary>
        /// 获取实体中的标识列
        /// </summary>
        public override Field GetIdentityField()
        {
            return _.articleId;
        }
        /// <summary>
        /// 获取列信息
        /// </summary>
        public override Field[] GetFields()
        {
            return new Field[] {
                _.articleId,
                _.categoryId,
                _.title,
                _.content,
                _.keyword,
                _.issuer,
                _.pubdate,
                _.state,
                _.hits,
                _.newFlag,
                _.hotFlag,
                _.topFlag,
                _.picFlag,
                _.Privilege,
                _.ImageUrl
            };
        }
        /// <summary>
        /// 获取值信息
        /// </summary>
        public override object[] GetValues()
        {
            return new object[] {
                this._articleId,
                this._categoryId,
                this._title,
                this._content,
                this._keyword,
                this._issuer,
                this._pubdate,
                this._state,
                this._hits,
                this._newFlag,
                this._hotFlag,
                this._topFlag,
                this._picFlag,
                this._Privilege,
                this.ImageUrl
            };
        }
        /// <summary>
        /// 是否是v1.10.5.6及以上版本实体。
        /// </summary>
        /// <returns></returns>
        public override bool V1_10_5_6_Plus()
        {
            return true;
        }
        #endregion

        #region _Field
        /// <summary>
        /// 字段信息
        /// </summary>
        public class _
        {
            /// <summary>
            /// * 
            /// </summary>
            public readonly static Field All = new Field("*", "Article");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field articleId = new Field("articleId", "Article", "");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field categoryId = new Field("categoryId", "Article", "");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field title = new Field("title", "Article", "");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field content = new Field("content", "Article", "");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field keyword = new Field("keyword", "Article", "");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field issuer = new Field("issuer", "Article", "");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field pubdate = new Field("pubdate", "Article", "");
            /// <summary>
            /// _1=发布，2=未发布
            /// </summary>
            public readonly static Field state = new Field("state", "Article", "_1=发布，2=未发布");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field hits = new Field("hits", "Article", "");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field newFlag = new Field("newFlag", "Article", "");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field hotFlag = new Field("hotFlag", "Article", "");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field topFlag = new Field("topFlag", "Article", "");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field picFlag = new Field("picFlag", "Article", "");
            /// <summary>
            /// 开放、保密
            /// </summary>
            public readonly static Field Privilege = new Field("Privilege", "Article", "开放、保密");
            public readonly static Field ImageUrl = new Field("ImageUrl", "Article", "开放、保密");

        }
        #endregion


    }

}
